package Service;

import Model.User;
import Model.UserQuery;
import utils.ReturnData;
import utils.ReturnDataForLayui;
import utils.pages.Page;
import utils.pages.PageBean;
import utils.permission.PageDataResult;

import javax.servlet.http.HttpSession;
import java.util.List;

/**
 * 用户信息管理
 */
public interface UserService {

    PageBean<User> getList(UserQuery query);
    ReturnData add(User user);
    ReturnData delete(User user);
    ReturnData updateState(User user);
    boolean update(User user);
    ReturnDataForLayui getName(User user);
    String setuser(User user, HttpSession session);
    User getuser(Integer id);
    PageDataResult getusers(User userSearch, int page, int limit);
    String deluser(Integer id);

    /**
     * 新增派工订单-默认机构信息显示
     * @return
     */
    String findSettleCodebyUserNumber(String UserNumber);

    /**
     * 护工页面-机构权限
     * @return
     */
     String findRoleIDbyUserNumber(String UserNumber);
    /**
     * 用户登陆：通过user_number查找用户
     * @param user_number
     * @return
     */
    User findUserByName (String user_number);

    /**
     * 用户登陆：通过user_number和password查找用户
     */
    User findUser (User user);

    User getUserById(Integer id);
    User getUserByName(String name);
    User getUserBySex(String sex);
    List<User> getUserId(int user_id);
    List<User> getUserName(String user_name);
    List<User> getUserSex(String user_sex);
    /**
     * 更新用户
     * @param user
     * @return
     */
    int updateUser(User user);

    Page<User> Show_All_User();
}
